package com.abacus.lcy.m;

import java.util.Calendar;
import java.util.Date;

public class CalendarParser extends DateParser {

	private static final ValueParser instance = new CalendarParser();

	public static final ValueParser getInstance() {
		return instance;
	}

	public Object valueOf(Value value) {
		Date date = (Date) super.valueOf(value);

		if (null != date) {
			Calendar calendar = Calendar.getInstance();
			calendar.setTime(date);
			return calendar;
		}

		return null;
	}

}
